<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="zh-cn">
<head>


	<!-- Bootstrap -->
	<include file="Include/css" />
	<title>卖家中心-首页</title>
	<link href="__STATICS__/css/index.css" rel="stylesheet">

</head>
<body>
<include file="Include/nav_top" />
<div class="container clearfix" id="left_menu_wraper" >
	<include  file="Include/menu_left" />
		<div id="right-content">
			<div id="right-content-inner">
				<ul class="breadcrumb">
					<span>您的位置：</span>
					<li><a href="index.php">首页</a> </li>
					<li class="">商家管理</li>
					<li class="active">商家信息</li>
				</ul>

				<div class="alert alert-danger  alert-dismissible" role="alert">

					<!--关闭按钮-->
					<button type="button" class="close" data-dismiss="alert" aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<!--内容-->
					<strong>温馨提示：</strong> {$lastsql}
				</div>

				<div role="tabpanel">

                        <!-- Tab panes -->
                        <div class="tab-content">
                            <div role="tabpanel" class="tab-pane active" id="home">

                                    <form >
                                        <div class="row clearfix">
                                            <div class="col-md-12 margin10">
                                                <div class="col-md-2 text_right form_bar">
                                                                商店帐号：
                                                </div>
                                                <div class="col-md-4">
                                                        <input id="shopAccount" type="text" class="form-control"/>
                                                </div>
                                                <div class="col-md-1 text_warning text_left form_bar">
                                                                *
                                                </div>
                                            </div>
                                            <div class="col-md-12 margin10">
                                                    <div class="col-md-2 text_right form_bar">
                                                            初始密码：
                                                    </div>
                                                    <div class="col-md-4">
                                                        <input id="shopPassword" type="text" class="form-control"/>
                                                    </div>
                                                    <div class="col-md-1 text_warning text_left form_bar">
                                                            *
                                                    </div>
                                            </div>
                                            <div class="col-md-12 margin10">
                                                    <div class="col-md-2 text_right form_bar">
                                                            确认密码：
                                                    </div>
                                                    <div class="col-md-4">
                                                        <input id="rePassword" type="text" class="form-control"/>
                                                    </div>
                                                    <div class="col-md-1 text_warning text_left form_bar">
                                                            *
                                                    </div>
                                            </div>
                                            <div class="col-md-12 margin10">
                                                    <div class="col-md-2 text_right form_bar">
                                                            商家名称：
                                                    </div>
                                                    <div class="col-md-4">
                                                        <input id="shopName" type="text" class="form-control"/>
                                                    </div>
                                                    <div class="col-md-1 text_warning text_left form_bar">
                                                            *
                                                    </div>
                                            </div>
                                            
                                       <div class="col-md-12 margin10" >
                                            <div class="col-md-2 text_right form_bar">
                                                省市区：
                                            </div>
                                            <div class="col-md-8 select_wraper">
                                                <div class="col-md-3">
                                                    <select  id="s_province" class="form-control">

                                                    </select>
                                                </div>

                                                <div class="col-md-3">
                                                        <select  id="s_city" class="form-control">

                                                        </select>
                                                </div>

                                                <div class="col-md-3">
                                                        <select id="s_county" class="form-control">

                                                        </select>
                                                </div>

                                            </div>

                                        </div>
                                        <div class="col-md-12 margin10">
                                                <div class="col-md-2 text_right form_bar">
                                                        详细地址：
                                                </div>
                                                <div class="col-md-4">
                                                        <input id="address" type="text" class="form-control"/>
                                                </div>
                                                <div class="col-md-1 text_warning text_left form_bar">
                                                        *
                                                </div>
                                        </div>
                                        <div class="col-md-12 margin10">
                                                <div class="col-md-2 text_right form_bar">
                                                        描述：
                                                </div>
                                                <div class="col-md-4">
                                                    <textarea id="desc" class="form-control"> </textarea>
                                                </div>
                                        </div>
                                            
                                            <div class="col-md-12 margin10" >
                                                <div class="col-md-2 text_right form_bar">
                                                        上传图片：
                                                </div>
                                                <div class="col-md-4">
                                                    <div class=" padding0 margin10">
                                                        <div class="upload_wraper dash">
                                                            <div class="logo_wraper ">
                                                                <img id="pic" src="__STATICS__/images/upload_comn.png" class="width100 img-rounded" alt="">
                                                                    <input type="file" class="input_file" id="fileupload" name="file" value="" data-url="" multiple="">
                                                                        </div>

                                                                        </div>
                                                    </div>
                                                </div>                                                                                             

                                            </div>

                                <div class="col-md-12 margin10" >
                                        <div class="col-md-2 text_right form_bar">
                                                经度：
                                        </div>
                                        <div class="col-md-4">
                                                <input type="text" placeholder="点击地图以确定" id="txt_lng" class="form-control"/>
                                        </div>

                                </div>
                                <div class="col-md-12 margin10" >
                                        <div class="col-md-2 text_right form_bar">
                                                纬度：
                                        </div>
                                        <div class="col-md-4">
                                                <input type="text" placeholder="点击地图以确定" id="txt_lat" class="form-control"/>
                                        </div>

                                </div>
                                
                                        <div class="col-md-12 margin10" >
                                                <div class="col-md-2 text_right form_bar">
                                                        <!--地址查找：-->&nbsp;
                                                </div>
                                                <div class="col-md-4">
                                                        <input type="text" id="map_address" placeholder="输入查找地址" class="form-control"/>
                                                </div>

                                        </div>


                                        <div class="col-md-10  padding0 pull-right">
                                                <div class="col-md-10 thumbnail pull-left  ">
                                                        <div id="map_wraper"  >

                                                        </div>
                                                </div>

                                        </div>

                                        <div class="col-md-12 margin10" >
                                                <div class="col-md-2 text_right form_bar">
                                                        &nbsp;
                                                </div>
                                                <div class="col-md-4">
                                                        <button class="btn btn-primary">提交信息</button>
                                                </div>

                                        </div>

                                </div>
                                                <input type="text" id="x" value="" />
                                                <input type="text" id="y" value="" />
                                                <input type="text" id="thumb" value="" />
                                                <input type="text" id="headImg" value="" />
                                                <input type="text" id="province" value="" />
                                                <input type="text" id="district" value="" />
                                                <input type="text" id="city" value="" />
                                        </form>

                                </div>
                        </div>

                </div>

			</div>
		</div>
</div>
<include file="Include/script" />
<script type="text/javascript" src="__STATICS__/js/jquery.ui.widget.js"></script>
<script type="text/javascript" src="__STATICS__/js//jquery.iframe-transport.js"></script>
<script type="text/javascript" src="__STATICS__/js/jquery.fileupload.js"></script>
<script type="text/javascript" src="__STATICS__/js/jquery-form.js"></script>
<script type="text/javascript" src="__STATICS__/js/upload_base.js"></script>
<script type="text/javascript" src="__STATICS__/js/area.js"></script>

<script src="__STATICS__/js//admin/hzAjax.js" type="text/javascript"></script>
<script type="text/javascript" src="__STATICS__/js/admin/shopMsg.js"></script>

<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.5&ak=ENPChdXUAEZB3Eg4dP6ytmKD"></script>

<script>
    var headImgUrl = "{:U('CNEPAdmin/Upload/uploadImg')}";
    var statics_url = "__STATICS__";
    
	/*菜单展开及高亮*/
		$(function(){
			$('.shop').addClass('open');
			$('#shop1').addClass('active');
		});



	$(document).ready(function () {
		//初始化百度地图

		var map = new BMap.Map("map_wraper");                        // 创建Map实例
		map.centerAndZoom("广州", 12);     // 初始化地图,设置中心点坐标和地图级别
		map.addControl(new BMap.NavigationControl());               // 添加平移缩放控件
		map.enableScrollWheelZoom();                            //启用滚轮放大缩小

		//初始化地址查找框
		$('#map_address').focus(function () {
			if ($(this).val() == '输入查找地址') {
				$(this).val('');
				$(this).css("color", "#000000");
			}
		});

		$('#map_address').blur(function () {
			if ($(this).val() == "") {
				$(this).val('输入查找地址');
				$(this).css("color", "#999999");
			}
		});

		//建立一个自动完成的对象
		var ac = new BMap.Autocomplete(
				{"input": "map_address"
					, "location": map
				});
		var myValue;
		//鼠标点击下拉列表后的事件
		ac.addEventListener("onconfirm", function (e) {
			var _value = e.item.value;
			myValue = _value.province + _value.city + _value.district + _value.street + _value.business;
			setPlace();
		});

		//定位函数
		function setPlace() {
			map.clearOverlays();    //清除地图上所有覆盖物
			function myFun() {
				var pp = local.getResults().getPoi(0).point;    //获取第一个智能搜索的结果
				map.centerAndZoom(pp, 18);
				map.addOverlay(new BMap.Marker(pp));    //添加标注
				$("#txt_lng").val(pp.lng);
				$("#txt_lat").val(pp.lat);
				$("#x").val(pp.lng);
				$("#y").val(pp.lat);

			}
			//智能搜索
			var local = new BMap.LocalSearch(map, {
				onSearchComplete: myFun
			});
			local.search(myValue);
		}
		map.addEventListener("click", function (e) {
			map.clearOverlays();    //清除地图上所有覆盖物
			//经度 e.point.lng
			$("#txt_lng").val(e.point.lng);
			$("#x").val(e.point.lng);
			//纬度 e.point.lat
			$("#txt_lat").val(e.point.lat);
			$("#y").val(e.point.lat);
			map.addOverlay(new BMap.Marker(e.point));
		});



		/*地址三级联动初始化*/
		_init_area();
	});
</script>
</body>
</html>